<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">

<head>
	<meta charset="utf-8">
	<title></title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="../static/elderlyInfo/main/layui/css/layui.css" media="all">
	<link rel="stylesheet" href="../static/elderlyInfo/main/css/thesame.css" media="all">
	<link rel="stylesheet" href="../static/elderlyInfo/css/rightCon.css" media="all">
	<link rel="stylesheet" href="../static/elderlyInfo/css/page.css" media="all">
	<link rel="stylesheet" href="../static/elderlyInfo/css/popCss.css" media="all">
	<style type="text/css">
		.add-mess-flex .add-mess-child:nth-child(3n+1) > div:nth-child(1) {
		    position: absolute;
		    top: 0;
		    left: 0;
		    width: 135px;
		    text-align: right;
		}
		.add-mess-flex .add-mess-child:nth-child(3n+1) > div:nth-child(2) {
		    padding-left: 135px;
		    margin-right: 40px;
		}
	</style>
<script>
	var isCURD=false;
</script>
</head>
<shiro:hasPermission name="ruzhulaorenxinx_cud">
  	<script>
  		isCURD =true;
  	</script> 
</shiro:hasPermission>

<body class="layui-layout-body">
	<div class="layui-body pad12px">
		<!-- 内容主体区域 -->
		<div class="layui-box-con relative">
			<div class="layui-left-con layui-left-label-con pad12px">
				<div class="border-radius4 bgWhite box-shadows">
					<div class="new-add-box-scroll">
						<nav class="label-nav-con" lay-filter="buildingFilter">
							<!-- <p class="f16px lh40px" style="padding-left: 33px;">全部</p> -->
							<input type="hidden" id="buildingNo" value="" name="">
							<ul class="lh40px f14px">
								<li  style="padding-left:33px" value=""  class="current">全部</li>
								<li th:each="list:${buildingList}" th:value="${list.buildingNo}"  th:text="${list.buildingName}"></li>
								<!-- <li>护理费</li>
								<li>长护险补贴</li>
								<li>认知情况</li>
								<li>居家情况</li>
								<li>认知情况</li> -->
							</ul>
						</nav>
					</div>
				</div>
			</div>
			<div class="layui-right-con layui-right-label-con" >
				<div class="border-radius4 bgWhite box-shadows">
					<div class="add-box-scroll">
						<div class="layui-tab layui-tab-time">
							<div class="layui-form layui-tab" lay-filter="isStayBackFilter">
								<ul class="layui-tab-title pl25px">
									 <!-- 1-否 2-是 -->
									<li value="1" class="layui-this">现有老人</li>
									<li value="2">已退住老人</li>
									<input type="hidden" id="isStayBack" name="">>
								</ul>
							</div> 
							<div class="layui-tab-content bgWhite pad25px">
								<div class="layui-tab-item layui-show">
									<div class="mb25px more-date border-bot1px">
										<div class="add-mess-flex ">
											<!-- <div class="add-mess-child">
												<div>
													<label>楼苑：</label>
												</div>
												<div class="add-mess-form">
													<p>
														<select name="" id="" class="form-select">
															<option value ="">选择</option>
														</select>
													</p>
												</div>
											</div> -->
											<div class="add-mess-child">
												<div>
													<label>房间号：</label>
												</div>
												<div class="add-mess-form"> 
													<p>
														<input id="roomName" type="text" placeholder="请输入">
													</p>
												</div>
											</div>
											<div class="add-mess-child">
												<div>
													<label>床号：</label>
												</div>
												<div class="add-mess-form">
													<p>
														<input id="bedName" type="text" placeholder="请输入">
													</p>
												</div>
											</div>
											<div class="add-mess-child">
												<div>
													<label>姓名：</label>
												</div>
												<div class="add-mess-form">
													<p>
														<input id="userName" type="text" placeholder="请输入">
													</p>
												</div>
											</div>
											<div class="add-mess-child"> 
												<div>                     
													<label>护理评估有效时间：</label>  
												</div>
												<div class="add-mess-form">
													<p>
														<input id="nextEffectDate" type="text" placeholder="请输入" class="layui-time test-item1">
													</p>
												</div>
											</div>
											<div class="add-mess-child">
												<div>
													<label>评估有效时间：</label>
												</div>
												<div class="add-mess-form">
													<p>
														<input id="validDate" type="text" placeholder="请输入" class="layui-time test-item2">
													</p>
												</div>
											</div>
											<div class="add-mess-child">
												<div>
													<label>护理员：</label>
												</div>
												<div class="add-mess-form">
													<p>
														<input id="staffName" onclick="staffInfoLayerOpen()" readonly="readonly"  type="text" placeholder="请输入">
														<input id="staffNo" type="hidden" value="" name="">
													</p> 
												</div>
											</div>
											<div class="add-mess-child">
												<div>
													<label>入住时间：</label>
												</div>
												<div class="add-mess-form">
													<p>
														<input id="startDate" type="text" placeholder="请输入" class="layui-time test-item3">
													</p>
												</div>
											</div>
											<div class="add-mess-child">
												<div>
													<label>合同截止时间：</label>
												</div>
												<div class="add-mess-form">
													<p>
														<input id="endDate" type="text" placeholder="请输入" class="layui-time test-item4">
													</p>
												</div>
											</div>
											<div class="add-mess-child">
												<div>
													<label>性别：</label> 
												</div>
												<div class="add-mess-form">
													<p>
														<select id="userSex" class="form-select">
															<option value ="">全部</option>
															<option value="1">男</option>
															<option value="2">女</option>
														</select>
													</p>
												</div>
											</div>
											<div class="add-mess-child">
												<div>
													<label>护理等级：</label>
												</div>
												<div class="add-mess-form">
													<p>
														<select id="nursingCostNo" name="" class="form-select">
															<option value ="">全部</option>
															<option th:each="list:${pageData.nursingCostList}" th:value="${list.costNo}"  th:text="${list.costName}"></option>
														</select>
													</p>
												</div>
											</div>
											<div class="add-mess-child">
												<div>
													<label>评估等级：</label>
												</div>
												<div class="add-mess-form">
													<p>
														<select  id="assessmentCostNo" class="form-select">
															<option value ="">全部</option>
															<option th:each="list:${pageData.assessmentCostList}" th:value="${list.costNo}"  th:text="${list.costName}"></option>
														</select>
													</p>
												</div>
											</div>
											<div class="add-mess-child">
												<div>
													<label>认知：</label> 
												</div>
												<div class="add-mess-form">
													<p>
														<select name="" id="cognitionStatus" class="form-select">
															<option value ="">全部</option>
															<option value ="0">否</option>
															<option value ="1">是</option>
														</select>
													</p>
												</div>
											</div>
											<div class="add-mess-child">
												<div>
													<label>年龄范围：</label>
												</div>
												<div class="add-mess-form">
													<p>
														<select  id="age" class="form-select">
															<option value ="">请选择</option>
															<option value ="1">60岁以下</option>
															<option value ="2">60-69岁</option>
															<option value ="3">70-79岁</option>
															<option value ="4">80-89岁</option>
															<option value ="5">90-99岁</option>
															<option value ="6">100岁及以上</option>
														</select>
													</p>
												</div>
											</div>
											<div class="add-mess-child">
												<div>
													<label>费用排序：</label>
												</div>
												<div class="add-mess-form">
													<p>
														<select name="" id="sort" class="form-select">
															<option value ="1">全部</option>
															<option value ="2">费用从高到低</option>
															<option value ="3">费用从低到高</option>
														</select>
													</p>
												</div>
											</div>
										</div>
										<div class="pt15px pb15px textRight">
											<p class="layui-btn" onclick="query()">查&nbsp;询</p>
											<p class="layui-btn layui-btn-primary" onclick="reset()">重&nbsp;置</p>
											<p class="green cursor right lh32px ml25px btn-select"><span>展开</span><img src="../static/elderlyInfo/img/select_icon_down.png" class="ml10px"></p>
										</div>
									</div>
									<div class="lh32px overflow add-btn-input mb20px">
										<p class="left cursor">
											<shiro:hasPermission name="ruzhulaorenxinx_cud">
												<span  class="white border-radius4 bgGreen inline-block pl15px pr15px"  id="addSpan" onclick="addLayerOpen()">
													<img src="../static/elderlyInfo/img/button_add.png">新建
												</span>
											</shiro:hasPermission>

											<shiro:hasPermission name="ruzhulaorenxinx_exp">
												<span onclick="exportReport()" class="white border-radius4 bgGreen inline-block pl15px pr15px mr25px ml25px"><img src="../static/elderlyInfo/img/icon_daochu.png">导出</span>
											</shiro:hasPermission>
										</p>
										<p class="right">
											<span>共有<em class="red fb ml5px mr5px" id="totalNum"></em>人</span>
										</p>
									</div>
									<div class="border1px border-radius4 relative mb40px layui-table-img">
										<table class="layui-hide" id="test" lay-filter="test"></table>
										<!-- <div class="number-page">共有<span class="red">120</span>条数据</div> -->
									</div>
								</div>
								<div class="layui-tab-item">
									<article>454545</article>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		
	</div>
	<div id="pop-con"  style="display: none;">
		<div class="pop-up" >
			<div>
				<div class="pop-title relative overflow mb15px">
					<span class="ml15px">编辑</span>
					<p class="right"><img src="../static/elderlyInfo/img/close_icon.png" class="block pop-close"><p>
				</div>
				<div class="pop-form mt30px mb30px">
					<div class="layui-form-item">
						<label class="layui-form-label border-box"><span class="red">*</span>身份证号：</label>
						<div class="layui-input-block">
							<input id="add_userPid" type="text" placeholder="请输入身份证" class="layui-input">
						</div>
					</div>
				</div>
				<div class="btn-con textCenter">
					<span class="btn-two cursor" onclick="verificationUserPid()">验&nbsp;证</span>
				</div>
			</div>
		</div>
	</div>


	<div id="nursingStaffInfo" style="display: none;">
		<div class="pop-up">
			<div>
				<div class="pop-title relative overflow mb15px">
					<span class="ml15px">护理员</span>
					<p class="right"><img src="../static/elderlyInfo/img/close_icon.png" class="block pop-close"><p>
				</div>
				<div class="border-top1px mt10px">
					<div class="overflow mt20px mb20px lh32px">
						<p class="left">共有<span id="totalNum2" class="red"></span>条数据</p>
						<div class="add-mess-form-border right relative ml30px">
							<p><input id="searchStaffName" type="text" placeholder="请输入"></p>
							<span onclick="getStaffInfoList()"><img src="../static/elderlyInfo/img/icon_search.png"></span>
						</div>
					</div>
					<article class="pop-box">
						<div class="pop-box-scroll">
							<div class="border1px border-radius4">
								<table class="layui-hide" id="test2" lay-filter="test2"></table>
							</div>
						</div>
					</article>
				</div>
				<div class="btn-con btn-con-position textCenter mt20px">
					<span class="btn-one cursor" onclick="cancelOfLayerOpen()">取&nbsp;消</span>
					<span class="btn-two cursor" onclick="confirmOfLayerOpen()">提&nbsp;交</span>
				</div>
			</div>
		</div>
	</div>



<script src="../static/elderlyInfo/main/js/jquery-2.1.3.min.js"></script>
<script src="../static/elderlyInfo/main/layui/layui.js" charset="utf-8"></script>
<script>

	$(function(){
		layui.use(['element', 'table', 'layer', 'laydate'], function() {
			var laydate = layui.laydate;
			laydate.render({
				elem: '.test-item1',
				trigger: 'click',
			});
			laydate.render({
				elem: '.test-item2',
				trigger: 'click',
			});
			laydate.render({
				elem: '.test-item3',
				trigger: 'click',
			});
			laydate.render({
				elem: '.test-item4',
				trigger: 'click',
			});

		});

		//展开收起
		$('.more-date div.add-mess-child:gt(5)').hide();
		$('.btn-select').click(function() {
			if ($(this).find('img').attr('src') == '../static/elderlyInfo/img/select_icon_down.png') {
				$(this).find('img').attr('src', '../static/elderlyInfo/img/select_icon_up.png').siblings("span").text("收起");
			} else {
				$(this).find('img').attr('src', '../static/elderlyInfo/img/select_icon_down.png').siblings("span").text("展开");
			}
			$('.more-date div.add-mess-child:gt(5)').slideToggle(300);
		})


		//侧边栏选中样式
		$('.label-nav-con li').click(function() {
			$(this).addClass('current').siblings().removeClass('current');
			// console.log($(this).attr("value"));
			// if (isNull($(this).attr("value"))) {
			// 	$("#addSpan").css("display","none");
			// }else{
			// 	$("#addSpan").css("display","");
			// }
		

			$("#buildingNo").val($(this).attr("value"));
		    query();
		})

		//分页查询
		query();


		//先赋值 是否退住 1-否 2-是
		$("#isStayBack").val("1");
		//选项卡监听
		layui.use('element', function(){
		  var element = layui.element;
		  element.on('tab(isStayBackFilter)', function(data){
		     // console.log(data.elem.context.value);
		    $("#isStayBack").val(data.elem.context.value);

		    //退住老人list  不需要添加按钮
			if ($("#isStayBack").val()==2) {
				$("#addSpan").css("display","none");
			}else{
				$("#addSpan").css("display","");
			}

			//查询
		    query();
		  });
		});

	})



	//重置
	function reset(){
		$("#roomName").val("");//房间号
		$("#bedName").val("");//房间号
		$("#userName").val("");//姓名
		$("#nextEffectDate").val("");//护理评估有效时间
		$("#validDate").val("");//评估有效时间
		$("#staffNo").val("");//护理员
		$("#startDate").val("");//入驻时间
		$("#endDate").val("");//合同截止时间
		$("#userSex").val("");//性别
		$("#nursingCostNo").val("");//护理等级
		$("#assessmentCostNo").val("");//认知
		$("#cognitionStatus").val("");//年龄范围
		$("#age").val("");//年龄范围
		$("#sort").val("");//排序
		$("#staffName").val("");//护理人员
		$("#staffNo").val("");//护理人员
	}

	//导出
	function exportReport(){
		var roomName = $("#roomName").val();//房间号
		var bedName = $("#bedName").val();//房间号
		var userName = $("#userName").val();//姓名
		var nextEffectDate = $("#nextEffectDate").val();//护理评估有效时间
		var validDate = $("#validDate").val();//评估有效时间
		var staffNo = $("#staffNo").val();//护理员
		var startDate = $("#startDate").val();//入驻时间
		var endDate = $("#endDate").val();//合同截止时间
		var userSex = $("#userSex").val();//性别
		var nursingCostNo = $("#nursingCostNo").val();//护理等级
		var assessmentCostNo = $("#assessmentCostNo").val();//认知
		var cognitionStatus = $("#cognitionStatus").val();//年龄范围
		var age = $("#age").val();//年龄范围
		var sort = $("#sort").val();//排序
		var isStayBack = $("#isStayBack").val();
		var buildingNo =  $("#buildingNo").val();

		window.location.href = "../elderlyInfo/getElderlyInfoReport?roomName="+roomName+"&bedName="+bedName+"&userName="+userName+"&nextEffectDate="+nextEffectDate+"&validDate="+validDate+"&staffNo="+staffNo+"&startDate="+startDate+"&endDate="+endDate+"&userSex="+userSex+"&nursingCostNo="+nursingCostNo+"&assessmentCostNo="+assessmentCostNo+"&cognitionStatus="+cognitionStatus+"&age="+age+"&isStayBack="+isStayBack+"&buildingNo="+buildingNo;
	}


	//查询
	function query(){
        //左侧菜单栏
		layui.use(['table'], function() {
			var table = layui.table;
			
			//第一个实例
			table.render({
				elem: '#test'//,url: '/demo/table/user/'
				,url:"../elderlyInfo/getElderlyInfoPageList"
				,where: getFormDataOfQuery()
				,request: {
					 pageName: 'currentPage' //页码的参数名称，默认：page
					 ,limitName: 'pageSize' //每页数据量的参数名，默认：limit
				}
				//,count: 10  //数据总数，从服务端得到
				//,data: listData
				,page: true //开启分页
				,limit:10 //每页显示的条数
				//,limits:[3,4,5]
				,groups: 9 //连续页码个数
				,parseData:function(res){
					if(!isNull(res)){
						return{
							"code":res.code,
							"data":res.data.data,
							"count":res.data.totalCount,
							"limit":res.data.pageSize,
						};
					}
					
				}
				,cols: [
					[ //表头
						 {
							field: 'imgPath',
							title: '照片',
							templet:function(res){
								if (isNull(res.imgPath)) {
									return "<div class='table-img'><span><img src='../static/img/defaultHead.jpg'></span></div>"
								}else{
									return "<div class='table-img'><span><img src='"+res.imgPath+"'></span></div>"
								}
							}
						},{
							field: 'userName',
							title: '姓名',
						}, {
							field: 'userSex',
							title: '性别',
						}, {
							field: 'age',
							title: '年龄',
						}, {
							field: 'buildingName',
							title: '楼苑',
						}, {
							field: 'roomName',
							title: '房间号',
						}, {
							field: 'bedName',
							title: '床号',
						}, {
							field: 'staffName',
							title: '护理员',
						}, {
							field: 'nursingCostName',
							title: '护理等级',
						}, {
							field: 'assessmentCostName',
							title: '评估等级',
						}, {
							field: 'cognationStatus',
							title: '认知',
							templet:function(res){
								if (res.cognitionStatus==1) {
									return "<div><span><img src='../static//elderlyInfo/img/duigou.png'></span></div>"
								}else{
									return "<div><span></span></div>"
								}
							}
						}, {
							field: 'startDate',
							title: '入住时间',
						},{
							field: 'operation',
							title: '操作',
							style: 'color:#1C9399;',
							fixed: 'right',
							templet: function(res){
								if (isCURD) {
									return '<div class="table-list-btn"><span class="cursor" onclick="getdetail(\''+res.userNo+'\')">查看</span>|<span  class="cursor" onclick="deleteInfo(\''+res.userNo+'\')">删除</span></div>';
								}else{
									return '<div class="table-list-btn" style="color: #eee;"><span style="color: #eee; class="cursor">查看</span>|<span  style="color: #eee;class="cursor">删除</span></div>';
								}

								
							}
						}
					]
				]
				,done:function(res, curr, count){
				    $("#totalNum").text(count);
				}
			});
		});
	}

	//获取查询时候的参数
	function getFormDataOfQuery(){
		var roomName = $("#roomName").val();//房间号
		var bedName = $("#bedName").val();//房间号
		var userName = $("#userName").val();//姓名
		var nextEffectDate = $("#nextEffectDate").val();//护理评估有效时间
		var validDate = $("#validDate").val();//评估有效时间
		var staffNo = $("#staffNo").val();//护理员
		var startDate = $("#startDate").val();//入驻时间
		var endDate = $("#endDate").val();//合同截止时间
		var userSex = $("#userSex").val();//性别
		var nursingCostNo = $("#nursingCostNo").val();//护理等级
		var assessmentCostNo = $("#assessmentCostNo").val();//认知
		var cognitionStatus = $("#cognitionStatus").val();//年龄范围
		var age = $("#age").val();//年龄范围
		var sort = $("#sort").val();//排序
		var isStayBack = $("#isStayBack").val();
		var buildingNo =  $("#buildingNo").val();

		// console.log(buildingNo);

		var formDate =
            {	
            	roomName : roomName,
            	bedName : bedName,
            	userName : userName,
            	nextEffectDate : nextEffectDate,
            	validDate : validDate,
            	staffNo : staffNo,
            	startDate : startDate,
            	endDate : endDate,
            	userSex : userSex,
            	nursingCostNo : nursingCostNo,
            	assessmentCostNo : assessmentCostNo,
            	cognitionStatus : cognitionStatus,
            	age : age,
            	sort : sort,
            	isStayBack : isStayBack,
            	buildingNo : buildingNo
            };
        return formDate;
	}




	//查看
	function getdetail(userNo){
		window.location.href="../elderlyInfo/jumpElderlyInfoDetail?userNo="+userNo
	}


	//删除
	function deleteInfo(userNo){

		layer.confirm('确定要删除档案么？', {
		  btn: ['确定', '取消'] //可以无限个按钮
		}, function(index, layero){
		  	del(userNo);
		}, function(index){
		  
		});
	}


	//删除
	function del(userNo){
		var formDate =
        {
            userNo: userNo
        };

		$.ajax({
            url: "../elderlyInfo/deleteYlElderlyInfo",
            type: "post",
            dataType: "json",
            data: formDate,
            async: false,
            success: function (res) {	
                if (res.code == "200") {
                	layer.msg('删除成功', {icon: 1,time:1500},function(){
                		query();
                	});
                }else{
                	layer.msg(res.msg, {icon: 2});
                }
            },
        });

	}


	//验证身份证
	function verificationUserPid(){
		var userPid  = $("#add_userPid").val();
		if (isNull(userPid)) {
			layer.msg('身份证号不能为空', {time: 2000});
			return;
		}else{
			if (userPid.length>18) {
				layer.msg('身份证号过长', {time: 2000});
			return;
			}
		}

		var formDate =
        {
            userPid: userPid
        };

		$.ajax({
            url: "../elderlyInfo/isExistForUserPid",
            type: "post",
            dataType: "json",
            data: formDate,
            async: false,
            success: function (res) {	
                if (res.code == "200") {
                	layer.msg('验证通过', {icon: 1,time:1500},function(){
							window.location.href="../elderlyInfo/jumpElderlyInfoAdd?userPid="+userPid;
						});
                }else{
                	layer.msg(res.msg, {icon: 2});
                }
            },
        });

	}


	//新建身份证号
	function addLayerOpen(){

		// if(isNull($("#buildingNo").val())){
		// 	layer.msg("请选择小区", {time: 2000});
		// 	return;
		// }
		layer.open({
			type: 1,
			title: false, //不显示标题栏
			closeBtn: false,
			area: ['500px', ''],
			shade: 0.6,
			id: 'payCons', //设定一个id，防止重复弹出
			/*,btn: ['确认支付']*/
			btnAlign: 'c',
			moveType: 1, //拖拽模式，0或者1
			shadeClose: true, //设置允许点遮罩关闭
			content: $("div#pop-con"),
			success: function() {
				//关闭弹层
				$(".pop-close").click(function() {
					layer.closeAll();
				});
			},
	
		});
	}


	//弹层的 取消 按钮
	var staffNo = "";
	var staffName ="";
	function cancelOfLayerOpen(){
		// staffNo ="";
		// staffName ="";
		$("#searchStaffName").val("");
		layer.closeAll();
	}

	//弹层的 提交 按钮
	function confirmOfLayerOpen(){
		//给input框赋值
		$("#staffName").val(staffName);
		$("#staffNo").val(staffNo);
		$("#searchStaffName").val("");
		layer.closeAll();
	}

	//护理员弹框
	function staffInfoLayerOpen(){
		layui.use(['element' , 'form' , 'table' , 'laydate' , 'layer'], function() {
			var layer = layui.layer;
			layer.open({
					type: 1,
					title: false, //不显示标题栏
					closeBtn: false,
					area: ['800px', '600px'],
					shade: 0.6,
					id: 'payCons', //设定一个id，防止重复弹出
					/*,btn: ['确认支付']*/
					btnAlign: 'c',
					moveType: 1, //拖拽模式，0或者1
					shadeClose: true, //设置允许点遮罩关闭
					content: $("div#nursingStaffInfo"),
					success: function() {
						getStaffInfoList();
						//关闭弹层
						$(".pop-close").click(function() {
							layer.closeAll();
						});
					},
				
				});
		})
	}

	//获取护理员信息
	function getStaffInfoList(){


		var searchStaffName = $("#searchStaffName").val();
	 	var formDate =
        {
        	staffName : searchStaffName
        };

		//左侧菜单栏
		layui.use(['table'], function() {
			var table = layui.table;
			//第一个实例
			table.render({
				elem: '#test2'//,url: '/demo/table/user/'
				,url:"../elderlyInfo/getYlStaffInfoList"
				,where: formDate
				,request: {
					 pageName: 'currentPage' //页码的参数名称，默认：page
					 ,limitName: 'pageSize' //每页数据量的参数名，默认：limit
				}
				//,count: 10  //数据总数，从服务端得到
				//,data: listData
				,page: true //开启分页
				,limit:10 //每页显示的条数
				//,limits:[3,4,5]
				,groups: 3 //连续页码个数
				,parseData:function(res){
						return{
							"code":res.code,
							"data":res.data.data,
							"count":res.data.totalCount,
							"limit":res.data.pageSize,
						};
				}
				,cols: [
					[ 
						{
							type: 'radio',
						},
						{
							field: 'staffName',
							title: '姓名',
						}, {
							field: 'post',
							title: '岗位',
						}
					]
				]
				,done:function(res, curr, count){
				    $("#totalNum2").text(count);

				    //监听事件
				    table.on('radio(test2)', function(obj){
						//查看obj结构 console.log(obj); console.log(obj.checked);  //是否选中，选中为true
						//选中行的数据  
						// console.log(obj.data);
						staffNo = obj.data.staffNo;
						staffName = obj.data.staffName;
					});
				}
			});
		});

	}






	function isNull(value) {
		return value == null || value === "" || value === undefined;
	}



</script>
</body>

</html>
